package com.lmax.disruptor.custom.group;

import com.lmax.disruptor.EventHandler;
import com.lmax.disruptor.custom.demo.Trade;

public class Handler3 implements EventHandler<Trade>
{

    private String name = "handler3";


    public void onEvent(final Trade event) throws Exception
    {
//        System.out.println("handler3: name: " + event.getName() + " , price: " + event.getPrice() + ";  instance: " + event.toString());
        Thread.sleep(1000);
    }

    @Override
    public void onEvent(final Trade trade, final long seq, final boolean endOfChain) throws Exception
    {
        System.out.println("---" + name + "----" + seq);
        this.onEvent(trade);
    }
}
